import _ from "lodash";

// 能源分类
const categorys = {
  0: "电力",
  1: "柴油",
  2: "汽油",
  3: "液化天然气",
  4: "二氧化碳",
  5: "外购电力",
  6: "柴油(生产、自有船舶、车辆)",
  7: "通勤车辆柴油",
  8: "通勤车辆汽油",
  9: "液化天然气",
  10: "液态二氧化碳",
  11: "瓶装二氧化碳",
  12: "瓶装乙炔(5kg)",
  13: "瓶装乙炔(40L)",
};

const units = {
  电力: "万kWh",
  柴油: "L",
  汽油: "L",
  液化天然气: "t",
  二氧化碳: "t",
  外购电力: "万kWh",
  "柴油(生产、自有船舶、车辆)": "L",
  通勤车辆柴油: "L",
  通勤车辆汽油: "L",
  液化天然气: "L",
  液态二氧化碳: "L",
  瓶装二氧化碳: "7kg/瓶",
  "瓶装乙炔(5kg)": "5kg/瓶",
  "瓶装乙炔(40L)": "40L/瓶",
};

const companys = {
  1: "友联船厂",
  2: "招商重工",
  3: "孖洲岛",
};

// 因子类型
const factorCategory = {
  ...categorys,
  14: "碳排放量月度/年度指标",
  15: "碳排放强度月度/年度指标",
  16: `${companys["1"]}-深圳市碳配额`,
  17: `${companys["2"]}-深圳市碳配额`,
  18: `${companys["3"]}-深圳市碳配额`,
  19: `电力-船舶及海洋工程装备`,
  20: "液化天然气-船舶及海洋工程装备",
  21: "二氧化碳-船舶及海洋工程装备",
};

// 船厂碳排初始化模板
const tmp = {
  title: "",
  monitor: [
    {
      name: categorys[0],
      unit: units[categorys[0]],
      factor: 9.489, //深圳碳排放因子
      ratio: 1, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[1],
      unit: units[categorys[1]],
      factor: 3.1, //深圳碳排放因子
      ratio: 0.85 / 1000, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[2],
      unit: units[categorys[2]],
      factor: 2.92, //深圳碳排放因子
      ratio: 0.72 / 1000, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[3],
      unit: units[categorys[3]],
      factor: 2.58, //深圳碳排放因子
      ratio: 1, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[4],
      unit: units[categorys[4]],
      factor: 1, //深圳碳排放因子
      ratio: 1, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: "总产值",
      unit: "万元",
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
  ],
  verify: [
    {
      name: categorys[5],
      unit: units[categorys[5]],
      factor: 9.489, //深圳碳排放因子
      ratio: 1, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[6],
      unit: units[categorys[6]],
      factor: 3.1, //深圳碳排放因子
      ratio: 0.845 / 1000, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[7],
      unit: units[categorys[7]],
      factor: 3.1, //深圳碳排放因子
      ratio: 0.845 / 1000, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[8],
      unit: units[categorys[8]],
      factor: 2.92, //深圳碳排放因子
      ratio: 0.775 / 1000, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[9],
      unit: units[categorys[9]],
      factor: 2.58, //深圳碳排放因子
      ratio: 1, // 比例
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[10],
      unit: units[categorys[10]],
      factor: 1, //深圳碳排放因子
      ratio: 1,
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[11],
      unit: units[categorys[11]],
      factor: 1, //深圳碳排放因子
      ratio: 7 / 1000,
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[12],
      unit: units[categorys[12]],
      factor: 3.38, //深圳碳排放因子
      ratio: 5 / 1000,
      months: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    },
    {
      name: categorys[13],
      unit: units[categorys[13]],
      factor: 3.38, //深圳碳排放因子
      ratio: 40 / 1000 / 234,
      months: [0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0],
    },
  ],
};

export { categorys, companys, tmp, factorCategory, units };
